{extend name="app/shop/view/base.html"/}
{block name="resources"}
<style>
	.view{position:fixed;width:100%;height:100%;background:#f6f8f9}
	.content{position:absolute;left:50%;top:50%;transform:translate(-50%,-70%);text-align:center}
	.content img{display:block;margin:0 auto;width:47px;height:47px}
	.content-title{margin:25px auto;font-size:26px;color:#323233}
	.content-desc{width:450px;line-height:24px;font-size:16px;color:#969799}
	.view-button{width:240px;margin-top: 25px;}
	.error-button{background-color:red!important;border:none;}

</style>
{/block}
{block name="body"}
<div class="view">
	<div class="content">
		{if $is_success}
			<img src="SHOP_IMG/success.png">
			<div class="content-title">恭喜！授权成功</div>
			<p class="content-desc">{$type_name}“{$name}”已完成授权</p>
		{else/}
			<img src="SHOP_IMG/error.png">
			<div class="content-title">授权失败</div>
			<p class="content-desc">{$type_name}授权出现错误</p>
			<p class="content-desc">{$error}</p>
		{/if}

		<button type="button" onclick="goIndex();" class="layui-btn ns-bg-color view-button{if !$is_success} error-button{/if}" >确定</button>
	</div>
</div>
{/block}
{block name="script"}
<script>
	function goIndex(){
		location.href="{:addon_url('shop/index/index')}";
	}
</script>
{/block}